<?php
defined("VALIDASI") or die ( 'Tidak diperkenankan mengakses file ini secara langsung !');
if($_SESSION[level]=='beli') {
//query
$sql_tbltransaksi=mysql_query("select * from v_laporan_pembelian
where Tgltransaksi='$tgl_transaksi' order by IDtransaksi desc") or die (mysql_error());
?>
<table align="center" class="table">
<tr>
<th width="20"><b>No.</th>
<th width="150"><b>Barang</th>
<th>Suplier</th>
<th>Keterangan</th>
<th>Harga</th>
<th colspan="2">Jumlah</th></tr>
<?php
while($baris_tbltransaksi=mysql_fetch_array($sql_tbltransaksi)) {
$no++;
if($no==0) {$warna="";$n++;} else {$warna="#dedee";$n--;}
?>
<tr valign="top"bgcolor="$warna">
<td align="center"><?php echo $no;?>.</td>
<td><?php echo $baris_tbltransaksi[IDBarang]." -
".$baris_tbltransaksi[NamaBrg];?></td>
<td><?php echo $baris_tbltransaksi[NamaSupplier];?></td>
<td align="center"><?php echo $baris_tbltransaksi[Keterangan];?></td>
<td>Rp. <?php echo str_replace(",",".",number_format($baris_tbltransaksi[Harga],0));?></td>
<td align="center"><?php echo $baris_tbltransaksi[Jumlah];?></td>
<td width="20">
<a href="index.php?file=pembelian_hapus&id=<?php echo
$baris_tbltransaksi[IDTransaksi];?>"><img src="./image/delete.png" width=100% title="Delete"></a></td>
</tr>
<?php
}
?>
</table>
<?php
} else {

echo"Akses ditolak! anda login sebagai $_SESSION[level]";
}
?>